/* 基础变量定义 */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --background-color: #f7f9fc;
    --app-background: #ffffff;
    --text-color: #333;
    --label-color: #555;
    --border-color: #ddd;
    --input-background: #ffffff;
    --response-background: #f8f9fa;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Ayu 主题颜色 */
    --ayu-bg: #0B0E14;
    --ayu-fg: #B3B1AD;
    --ayu-keyword: #FF8F40;
    --ayu-func: #FFB454;
    --ayu-string: #C2D94C;
    --ayu-number: #FF8F40;
    --ayu-constant: #FFEE99;
    --ayu-comment: #626A73;
    --ayu-operator: #F29668;
    --ayu-class: #59C2FF;
    --ayu-variable: #B3B1AD;
    --ayu-property: #39BAE6;

    /* 添加字体变量 */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco, Consolas, monospace;
    --font-size-base: 14px;
    --font-size-small: 12px;
    --font-size-large: 16px;
    --line-height-base: 1.5;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;
}

/* 暗色主题变量 */
[data-theme="dark"] {
    --background-color: #1a1a1a;
    --app-background: #2d2d2d;
    --text-color: #e0e0e0;
    --label-color: #cccccc;
    --border-color: #1A1F29;
    --input-background: var(--ayu-bg);
    --response-background: var(--ayu-bg);
}

/* 基础布局样式 */
body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-normal);
    margin: 0;
    padding: 16px;
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s;
}

#app {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--app-background);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow-color);
    padding: 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    margin: 0;
    font-size: 24px;
    color: var(--text-color);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.5px;
}

.theme-toggle {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

/* 表单组件样式 */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.method-group,
.timeout-group {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--label-color);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
}

/* 输入框基础样式 */
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-background);
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2.1 4.5l3.9 3.9 3.9-3.9c.2-.2.2-.5 0-.7s-.5-.2-.7 0L5.5 7.5 1.8 3.8c-.2-.2-.5-.2-.7 0s-.2.5 0 .7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding: 0 36px 0 12px;
    cursor: pointer;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-background);
    color: var(--text-color);
    transition: all 0.2s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 100px;
}

select:hover {
    border-color: var(--primary-color);
    background-color: var(--response-background);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23007bff' d='M2.1 4.5l3.9 3.9 3.9-3.9c.2-.2.2-.5 0-.7s-.5-.2-.7 0L5.5 7.5 1.8 3.8c-.2-.2-.5-.2-.7 0s-.2.5 0 .7z'/%3E%3C/svg%3E");
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 选项样式 */
select option {
    padding: 8px 12px;
    background-color: var(--input-background);
    color: var(--text-color);
}

/* 请求参数区域样式 */
.params-container {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    background-color: var(--app-background);
    transition: all 0.3s ease;
}

.params-header {
    padding: 12px 16px;
    background-color: var(--app-background);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.params-header:hover {
    background-color: var(--response-background);
}

.params-title {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.params-title label {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-medium);
}

.params-content {
    background-color: var(--response-background);
    transition: all 0.3s ease;
}

.params-container textarea {
    width: 100%;
    min-height: 200px;
    max-height: 500px;
    padding: 16px;
    border: none;
    font-family: var(--font-family-mono);
    font-size: 13px;
    line-height: 1.6;
    background-color: transparent;
    color: var(--text-color);
    resize: vertical;
    tab-size: 2;
    transition: all 0.3s ease;
}

.params-container.collapsed .params-content {
    height: 0;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
}

/* 暗色主题适配 */
[data-theme="dark"] .params-container {
    background-color: var(--ayu-bg);
}

[data-theme="dark"] .params-header {
    background-color: var(--ayu-bg);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .params-container textarea {
        min-height: 160px;
        max-height: 400px;
        font-size: 12px;
        padding: 12px;
    }
}

/* 箭头样式 */
.toggle-icon {
    display: inline-block;
    font-size: 16px;
    transition: transform 0.3s ease;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .params-content {
        min-height: 160px;
        max-height: 400px;
    }

    .params-container textarea {
        min-height: 160px;
        max-height: 400px;
        font-size: 12px;
        padding: 12px;
    }
}

.params-container textarea:focus {
    outline: none;
    box-shadow: none;
}

/* 工具栏样式 */
.params-tools {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 28px;
}

/* 按钮样式 */
.tool-button, .copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--app-background);
    color: var(--text-color);
    font-size: var(--font-size-small);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tool-button:hover, .copy-button:hover {
    background-color: var(--response-background);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tool-button:active, .copy-button:active {
    transform: translateY(1px);
}

.button-icon {
    font-size: 14px;
    line-height: 1;
}

/* 发送按钮样式 */
.send-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    margin: 0;
    align-self: flex-end;
}

.send-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* 加载动画容器 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

/* 新的加载动画样式 */
.spinner {
    width: 40px;
    height: 40px;
    position: relative;
}

.spinner::before,
.spinner::after {
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 0;
    animation: sk-bounce 2s ease-in-out infinite;
    opacity: 0.6;
    transform-origin: center center;
}

.spinner::after {
    animation-delay: -1s;
}

.loading span {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translateY(0);
    animation: float 2s ease-in-out infinite;
}

/* 加载动画关键帧 */
@keyframes sk-bounce {
    0%, 100% {
        transform: scale(0.3);
        opacity: 0.8;
    }
    50% {
        transform: scale(1);
        opacity: 0.2;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* 暗色主题适配 */
[data-theme="dark"] .loading {
    background-color: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .loading span {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .spinner {
        width: 32px;
        height: 32px;
    }
    
    .loading span {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* 响应区域样式 */
.response-container {
    margin-top: 24px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
}

.response-header {
    padding: 12px 16px;
    background-color: var(--app-background);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.response-header:hover {
    background-color: var(--response-background);
}

.response-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.response-title h2 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-medium);
}

.toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.response-container.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.response-container.collapsed .response {
    display: none;
}

.response {
    padding: 16px;
    font-size: 13px;
    line-height: 1.5;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    tab-size: 2;
    animation: slide-down 0.3s ease;
    font-family: var(--font-family-mono);
    font-size: 13px;
    line-height: 1.6;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.response-info {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 12px;
}

.status-code {
    user-select: none;
    font-size: var(--font-size-small);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--app-background);
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-medium);
}

.status-code.success {
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.status-code.error {
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

/* 滚动条样式 */
textarea::-webkit-scrollbar,
.response::-webkit-scrollbar,
.history-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

textarea::-webkit-scrollbar-track,
.response::-webkit-scrollbar-track,
.history-list::-webkit-scrollbar-track {
    background: transparent;
}

textarea::-webkit-scrollbar-thumb,
.response::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover,
.response::-webkit-scrollbar-thumb:hover,
.history-list::-webkit-scrollbar-thumb:hover {
    background: var(--label-color);
}

/* JSON 语法高亮 */
.json-key { color: #2F86D2; }
.json-string { color: #86B300; }
.json-number { color: #FF8F40; }
.json-boolean { color: #FA8D3E; }
.json-null { color: #F07171; }
.json-array { 
    color: #B5CEA8;
    font-style: italic;
}

/* 暗色主题下的 JSON 高亮 */
[data-theme="dark"] .json-key { color: var(--ayu-property); }
[data-theme="dark"] .json-string { color: var(--ayu-string); }
[data-theme="dark"] .json-number { color: var(--ayu-number); }
[data-theme="dark"] .json-boolean { color: var(--ayu-constant); }
[data-theme="dark"] .json-null { color: var(--ayu-keyword); }
[data-theme="dark"] .json-array { 
    color: var(--ayu-func);
    opacity: 0.9;
}

/* 动画 */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    #app {
        padding: 16px;
    }

    .url-input-group {
        flex-direction: column;
    }

    .url-select {
        width: 100%;
    }

    .form-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .method-group,
    .timeout-group {
        width: calc(50% - 6px);
        margin-bottom: 0;
    }

    .send-button {
        width: 100%;
        margin-top: 12px;
    }

    .params-container textarea {
        height: 240px;
    }

    .response {
        max-height: 400px;
    }
}

/* 历史记录面板样式 */
.history-panel {
    margin-top: 24px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    background-color: var(--app-background);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--app-background);
    border-bottom: 1px solid var(--border-color);
}

.history-header h2 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-medium);
    color: var(--text-color);
}

.clear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 70px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--app-background);
    color: var(--text-color);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-button:hover {
    background-color: var(--response-background);
    border-color: var(--error-color);
    color: var(--error-color);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    background-color: var(--response-background);
}

.history-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background-color: var(--input-background);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-item-method {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.history-item-method.get {
    color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.history-item-method.post {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.1);
}

.history-item-method.delete {
    color: var(--error-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.history-item-time {
    font-size: var(--font-size-small);
    color: var(--label-color);
}

.history-item-url {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-small);
    color: var(--text-color);
    word-break: break-all;
}

/* 暗色主题适配 */
[data-theme="dark"] .history-panel {
    background-color: var(--ayu-bg);
}

[data-theme="dark"] .history-item:hover {
    background-color: var(--app-background);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .history-list {
        max-height: 240px;
    }

    .history-item {
        padding: 10px 12px;
    }

    .history-item-method {
        font-size: 11px;
        padding: 2px 6px;
    }

    .history-item-time {
        font-size: 11px;
    }

    .history-item-url {
        font-size: 12px;
    }
}

/* URL 输入组样式 */
.url-input-group {
    display: flex;
    gap: 12px;
    height: 36px;
}

.url-select {
    width: 180px;
    flex-shrink: 0;
    height: 36px;
    padding: 0 32px 0 10px;
    font-size: var(--font-size-base);
    background-position: right 10px center;
}

#url {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    font-size: var(--font-size-base);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .url-input-group {
        height: auto;
    }

    .url-select {
        width: 140px;
        height: 34px;
    }

    #url {
        height: 34px;
    }

    .method-select {
        height: 34px;
    }

    #timeout {
        height: 34px;
    }
}

/* 对话框样式 */
.dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dialog {
    background-color: var(--app-background);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    animation: dialog-show 0.3s ease;
}

.dialog h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--text-color);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.3px;
}

.dialog p {
    margin: 0 0 24px 0;
    color: var(--label-color);
    line-height: var(--line-height-base);
    font-size: var(--font-size-base);
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dialog-button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.dialog-button.cancel {
    background-color: transparent;
    color: var(--text-color);
}

.dialog-button.confirm {
    background-color: var(--error-color);
    color: white;
    border: none;
}

.dialog-button:hover {
    transform: translateY(-1px);
}

.dialog-button.cancel:hover {
    background-color: var(--response-background);
}

.dialog-button.confirm:hover {
    background-color: #dc3545;
}

@keyframes dialog-show {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 历史操作按钮样式 */
.history-actions {
    display: flex;
    gap: 8px;
}

.history-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background-color: var(--app-background);
    color: var(--text-color);
}

.history-button:hover {
    transform: translateY(-1px);
}

.history-button.clear:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

.history-button.undo {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.history-button.undo:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 暗色主题适配 */
[data-theme="dark"] .dialog {
    background-color: var(--ayu-bg);
}

/* 在 history-item 相关样式中添加 */
.history-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.history-item.active .history-item-url,
.history-item.active .history-item-time {
    color: white;
}

.history-item.active .history-item-method {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 暗色主题适配 */
[data-theme="dark"] .history-item.active {
    background-color: var(--primary-color);
}

[data-theme="dark"] .history-item.active:hover {
    background-color: var(--primary-hover);
}

/* 历史记录项操作区域样式 */
.history-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-item-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--label-color);
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    background-color: var(--error-color);
    color: white;
}

/* 活动状态下的删除按钮 */
.history-item.active .history-item-delete {
    color: rgba(255, 255, 255, 0.8);
    opacity: 1;
}

.history-item.active .history-item-delete:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 暗色主题适配 */
[data-theme="dark"] .history-item-delete {
    color: var(--label-color);
}

[data-theme="dark"] .history-item-delete:hover {
    background-color: var(--error-color);
    color: white;
}

/* 添加调整大小指示器的样式 */
.params-container::after {
    content: '';
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 12px;
    height: 12px;
    background: linear-gradient(
        135deg,
        transparent 50%,
        var(--border-color) 50%
    );
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* 优化暗色主题下的样式 */
[data-theme="dark"] .params-container::after {
    opacity: 0.3;
}

/* 添加参数区域的收起样式 */
.params-title {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.params-header:hover {
    background-color: var(--response-background);
}

.params-container.collapsed {
    min-height: unset;
    max-height: unset;
}

.params-container.collapsed textarea {
    transform: scaleY(0);
    height: 0;
    padding: 0;
    opacity: 0;
}

.params-container.collapsed::after {
    display: none;
    opacity: 0;
}

/* 箭头动画 */
.params-title .toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.params-container.collapsed + .params-header .toggle-icon,
.params-container.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* 调整大小指示器动画 */
.params-container::after {
    transition: opacity 0.3s ease;
}

.params-container.collapsed::after {
    opacity: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    :root {
        --font-size-base: 13px;
        --font-size-small: 11px;
        --font-size-large: 15px;
    }

    h1 {
        font-size: 20px;
    }

    .dialog h3 {
        font-size: 16px;
    }
}

/* URL 选择框样式 */
.url-select {
    width: 180px;
    flex-shrink: 0;
}

/* 模板选择框样式 */
.template-select {
    height: 28px;
    min-width: 100px;
    max-width: 160px;
    padding: 0 28px 0 8px;
    font-size: var(--font-size-small);
    background-position: right 8px center;
}

/* 请求方法选择框样式 */
.method-select {
    width: 110px;
    height: 36px;
    padding: 0 32px 0 10px;
}

#timeout {
    height: 36px;
    padding: 0 12px;
}

/* 暗色主题适配 */
[data-theme="dark"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M2.1 4.5l3.9 3.9 3.9-3.9c.2-.2.2-.5 0-.7s-.5-.2-.7 0L5.5 7.5 1.8 3.8c-.2-.2-.5-.2-.7 0s-.2.5 0 .7z'/%3E%3C/svg%3E");
}

[data-theme="dark"] select:hover {
    background-color: var(--ayu-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2339BAE6' d='M2.1 4.5l3.9 3.9 3.9-3.9c.2-.2.2-.5 0-.7s-.5-.2-.7 0L5.5 7.5 1.8 3.8c-.2-.2-.5-.2-.7 0s-.2.5 0 .7z'/%3E%3C/svg%3E");
}

[data-theme="dark"] select option {
    background-color: var(--ayu-bg);
    color: var(--text-color);
}

/* 移动端适配 */
@media (max-width: 768px) {
    select {
        font-size: var(--font-size-base);
        height: 38px;
        padding-right: 32px;
        background-position: right 10px center;
    }

    .url-select {
        width: 140px;
    }

    .template-select {
        min-width: 120px;
    }

    .method-select {
        width: 100px;
    }
}

/* 在历史操作按钮样式中添加导出按钮样式 */
.history-button.export {
    border-color: var(--success-color);
    color: var(--success-color);
}

.history-button.export:hover {
    background-color: var(--success-color);
    color: white;
}

/* 历史面板标题样式 */
.history-title {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.history-header {
    padding: 8px 12px;
    background-color: var(--app-background);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.history-header:hover {
    background-color: var(--response-background);
}

.history-content {
    transition: all 0.3s ease;
}

.history-panel.collapsed .history-content {
    height: 0;
    overflow: hidden;
}

.history-panel.collapsed .toggle-icon {
    transform: rotate(-90deg);
}
